package addon.w3.mdx.com;

import java.io.IOException;
import java.util.Vector;

import addon.w3.mdx.LEDataInputStream;
import addon.w3.mdx.MDXException;
import addon.w3.mdx.MDXParentCOM;

/**
GEOA						// [GeosetAnim]
	long	nbytes;
	struct {
		long	nbytesi;
		float	staticAlpha;		(1.0:use KGAO)
		long	ColorAnimation;		(0:none;1:DropShadow;2:Color;3:Both)
		float	ColorR, ColorG, ColorB; (default:1)
		long	GeosetID;
		(KGAO)
		(KGAC)
	} geosanims[ngsan];
 * @author madjk
 *
 */
public class MDXGeosetAnim extends MDXParentCOM {
	int length = -1;
	Vector geoanis = null;
	
	public String getTag() {
		return "GEOA";
	}
	
	public void _decode(LEDataInputStream ins) throws IOException, MDXException {
		length = ins.readInt();
		ins.skip(length);
//		int cntLength = 0;
//		geoanis = new Vector();
//		while(cntLength < length) {
//			MDXGeosetAnimCOM mdcom = new MDXGeosetAnimCOM();
//			mdcom.decode(ins);
//			geoanis.add(mdcom);
//			cntLength = mdcom.length+cntLength;
//			//System.out.println(" cntLength : "+cntLength);
//			//debug( mdcom.toString() );
//		}
//		//debug( geosets.get( (geosets.size()-1) ).toString() );
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("TAG : "+getTag());
		sb.append("\n\tELEN : "+length);
		if(geoanis != null && geoanis.size() > 0) sb.append("\n\tGEOANIMATIONS : "+geoanis.size());
		return sb.toString();
	}

	@Override
	public boolean isImplicitTag() {
		// TODO Auto-generated method stub
		return true;
	}
}